<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>词条创建界面</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="css/gcss.css">
  </head>
  <script type="text/javascript" >
	 function check(){
	    //判断词条不能为空
	        var thisform=document.getElementById('form');
	        with (thisform){
  				if (thisform.wordName.value.replace(/[ ]/g,"")==""){
  					alert("词条内容不能为空。");
  					return false;
  				}
  			}
  			//提交
       return true;
	 }
  </script>
  
  <body>
  
    <table width="100%">
				<tr>
					<td height="20" align="left">
						<a href="./index.jsp">首页</a>
					</td>
					<td height="20" align="right">
					
					</td>
				</tr>
			</table>
    <hr>
    <form action="./term/TermServlet?action=c" method="post" name='form' id="form" enctype="application/x-www-form-urlencoded">
    
    <table width="1030" height="41">
				<tr>
					<td height="20" align="left">
						<input class="text" name="wordName" type="text" size="40" value="" />
    					<input class="submit" type="submit" value="创建词条" name="submit" onclick="return check();"/>
					</td>
					<td height="20" align="right">
					
					</td>
				</tr>
			</table>
    </form>

  </body>
</html>
